package cn.ywang.pattern.proxy.staticproxy;

import cn.ywang.pattern.proxy.target.Son;

/**
 * 静态代理
 *
 * @author BeatificWang
 * @date 2019/3/11 23:44
 */
public class Father {

	private Son son;

	public Father(Son son) {
		this.son = son;
	}

	private void before() {
		System.out.println("代理开始：获取需求");
	}

	public void rent() {
		this.before();
		this.son.rent();
		this.after();
	}

	private void after() {
		System.out.println("已找到合适房源");
	}

}
